package org.ethan.order.domain;

import lombok.Data;
import org.ethan.basic.domain.BaseDomain;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 宠物订单
 */
@Data
public class OrderPet extends BaseDomain {

    // 0下单成功待支付 ，
    public static final int STATE_WAIT_PAY = 0;
    // 1支付成功待发货
    public static final int STATE_SUCCESS_PAY = 1;
    // 2用户取消订单
    public static final int STATE_USER_CANCEL = 2;
    // 3.订单超时自动取消
    public static final int STATE_PAY_TIMEOUT_CANCEL = 3;
    // 4.支付失败
    public static final int STATE_FAIL_PAY = 4;
    // 5.已经发货
    public static final int STATE_DELIVERY_SUCCESS = 5;
    // 6.确认收货,订单关闭
    public static final int STATE_USER_CONFIRM = 6;

    // 银联
    public static final int PAY_TYPE_BANK= 1;
    // 微信
    public static final int PAY_TYPE_WECHATPAY= 2;
    // 支付宝
    public static final int PAY_TYPE_ALIPAY= 3;

    // 订单备注
    private String digest;
    // 状态，默认等待支付
    private Integer state = STATE_WAIT_PAY;
    // 价格
    private BigDecimal totalPrice;
    // 购买数量
    private Integer totalCount;
    // 订单号
    private String orderSn;
    // 最后更新时间
    private Date lastUpdateTime;
    // 支付超时时间
    private Date payExpireTime;

    // 用户id
    private Long userId;
    // 创建时间
    private Date createTime;
    // 支付类型
    private Integer payType;
}
